What is a data translator?

Data translators translate specialized markup—such as server-side includes, conditional JavaScript statements, or other non-HTML code such as ePerl, PHP3, JSP, CFML, or ASP—into HTML code that can be read and displayed by Dreamweaver. In Dreamweaver 3 you can translate attributes within tags as well as entire tags or blocks of code.

Translated tags or blocks of code must be enclosed in locked regions to preserve the original markup. Translated attributes do not require locks, which makes inspecting the tags that contain them a simpler process.

All data translators—block/tag or attribute—are HTML files. The HEAD of a data translator contains two or more JavaScript functions: one that specifies what the translator does and the files it acts on, one that performs the actual translation, and any number of supporting functions. The BODY of a data translator is empty.

Data translation—especially for entire tags or blocks of code—might involve complex operations that either cannot be done with JavaScript or that would be more effeciently done with C. If you are familiar with C or C++, you should also read the section on C-Level Extensibility.